package com.yxj.threadcase1;

public class ThreadDemo6 {
    public static void main(String[] args) {
        /*
        * final void setDaemon(boolean on) 设置为守护线程*/

        MyThread61 t1 = new MyThread61();
        MyThread62 t2 = new MyThread62();

        t1.setName("女生");
        t2.setName("备胎");

        //t2被设置为了守护线程，其实就是备胎线程
        t2.setDaemon(true);

        t1.start();
        t2.start();
    }
}
